Add Weighted Bridging Centrality plugin - #336
Merged
Merged
Conversation
2 tasks done
The parent version was pinned to 0.11.1 while master/master-forge target 0.11.3. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
setup() unconditionally forced metric.setNormalized(true) before reading it back into the panel, so the checkbox never reflected the user's previous choice. StatSettings.save() was a no-op that read the metric's values but never wrote them anywhere. Persist the Normalized setting via NbPreferences.forModule(...) per this repo's Preferences convention, and drop the dead StatSettings class along with the unused isDirected/isNormalized fields on this class (never read elsewhere). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
No logic changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Every core Gephi Statistics panel (GraphDistancePanel, ModularityPanel, PageRankPanel, etc.) uses org.jdesktop.swingx.JXHeader for a title + description banner. This panel instead used a plain bold JLabel with no description, which looked inconsistent next to other panels in the Statistics UI. Depend on org.gephi:ui-library-wrapper (the wrapper module that exposes org.jdesktop.swingx.*, per this repo's dependency convention) and rebuild the panel around a JXHeader, sized to give the header enough room. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New plugin or plugin update?
What is the purpose of this plugin?
This plugin extends Gephi’s Bridging Centrality metric to weighted networks. It calculates betweenness centrality using weighted shortest paths, interpreting edge weights as connection strengths and converting them to effective distances using d=1/w. It then combines weighted betweenness centrality with the standard bridging coefficient to identify nodes that play important bridging roles between different regions of a weighted network.
How to test your plugin in Gephi?
Build and install the plugin in Gephi 0.11.1.
Create an undirected weighted network with four nodes (A, B, C, D) and the following edges: A–B with weight 10, B–D with weight 10, A–C with weight 1, and C–D with weight 1.
In the Statistics panel, run Weighted Bridging Centrality with Normalized unchecked.
The plugin should add three columns to the Data Laboratory: Weighted Betweenness Centrality, Bridging Coefficient, and Weighted Bridging Centrality.
The expected results are: Node A: Weighted Betweenness = 0.5, Bridging Coefficient = 0.5, Weighted Bridging Centrality = 0.25. Node B: Weighted Betweenness = 1.0, Bridging Coefficient = 0.5, Weighted Bridging Centrality = 0.50. Node C: Weighted Betweenness = 0.0, Bridging Coefficient = 0.5, Weighted Bridging Centrality = 0.00. Node D: Weighted Betweenness = 0.5, Bridging Coefficient = 0.5, Weighted Bridging Centrality = 0.25.
Edge weights are interpreted as connection strengths and converted to effective distances using d = 1/w. Thus, in this example, the path A–B–D has a total effective distance of 0.2, while A–C–D has a total effective distance of 2.0.
Checklist before submission
masterbranch to get the latest updates?pom.xmlfile